﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Fantacid303.ProcessAffinityControl.Config
{
	/// <summary>
	/// Represents a configuration including a name and a list of <see cref="ConfigurationRule"/>
	/// </summary>
	public class ConfigurationEntry
	{
		public ConfigurationEntry()
		{
			this.Rules = new List<ConfigurationRule>();
		}

		/// <summary>
		/// Gets or sets the name of the entry.
		/// </summary>
		/// <value>The name of the entry.</value>
		[XmlAttribute]
		public string Name
		{
			get;
			set;
		}

		/// <summary>
		/// Gets or sets the rules.
		/// </summary>
		/// <value>The rules.</value>
		public List<ConfigurationRule> Rules
		{ get; set; }

		/// <summary>
		/// Gets or sets a value indicating whether this entry is active.
		/// </summary>
		/// <value><c>true</c> if this entry is active; otherwise, <c>false</c>.</value>
		[XmlAttribute]
		public bool IsActive
		{ get; set; }
	}
}
